<script language="javascript" type="text/javascript">
        $(document).ready(function(){
            $( "#filter_end_date" ).datepicker({
                dateFormat: 'dd-mm-yy',
                changeMonth: true,
                changeYear: true,
                yearRange: '1900:2090'
            });
            $('#select_filter_end_date').click(function(){
                $( "#filter_end_date" ).datepicker('show');
            });
            $( "#filter_start_date" ).datepicker({
                dateFormat: 'dd-mm-yy',
                changeMonth: true,
                changeYear: true,
                yearRange: '1900:2090'
            });
            $('#select_filter_start_date').click(function(){
                $( "#filter_start_date" ).datepicker('show');
            });
        });
</script>
<div id="toolbar-box">
  <div class="t">
    <div class="t">
      <div class="t"></div>
    </div>
  </div>
  <div class="m">
    <div id="toolbar" class="toolbar">
    </div>
    <div class="header icon-48-user">Báo cáo doanh thu</div>
    <div class="clr"></div>
  </div>
  <div class="b">
    <div class="b">
      <div class="b"></div>
    </div>
  </div>
</div>
<?php echo $this->Session->flash('msg'); ?>
<div id="submenu-box">
  <div class="t">
    <div class="t">
      <div class="t"></div>
    </div>
  </div>
  <div class="m">
    <ul id="submenu">
      <li> <a href="<?php echo $this->Html->url(array('controller'=>'orders', 'action'=>'index')); ?>">Quản lý đơn đặt hàng</a> </li>
      <li> <a href="<?php echo $this->Html->url(array('controller'=>'transport_fee', 'action'=>'index')); ?>">Phí vận chuyển</a> </li>
      <li> <a class="active" href="<?php echo $this->Html->url(array('controller'=>'reports', 'action'=>'index')); ?>">Báo cáo doanh thu</a> </li>
    </ul>
    <div class="clr"></div>
  </div>
  <div class="b">
    <div class="b">
      <div class="b"></div>
    </div>
  </div>
</div>
<div id="element-box">
  <div class="t">
    <div class="t">
      <div class="t"></div>
    </div>
  </div>
  <div class="m">
    <form action="<?php echo $this->Html->url(array('controller'=>'reports')); ?>" method="post" name="adminForm" id="adminForm">
      <table width="100%">
        <tr>
            <td>
                Start: <input type="text" name="filter_start_date" id="filter_start_date" class="text_area" value=""/>
                <a href="javascript:void(0);" id="select_filter_start_date">
                    <?php echo $this->Html->image('ico_calendar.gif'); ?>
                </a>
                end: <input type="text" name="filter_end_date" id="filter_end_date" class="text_area" value=""/>
                <a href="javascript:void(0);" id="select_filter_end_date">
                    <?php echo $this->Html->image('ico_calendar.gif'); ?>
                </a>
                <button id="filter_button_date"/>Go</button>
                <button onClick="document.adminForm.filter_start_date.value='';document.adminForm.filter_end_date.value=''; document.adminForm.search.value=''; document.adminForm.submit();">Clear</button>
            </td>
        </tr>
      </table>
      <table class="adminlist">
        <thead>
          <tr>
            <th class="title">Tổng doanh thu</th>
            <th class="title">Đơn đặt hàng</th>
            <th>Đơn đăt hàng đã hoàn thành</th>
          </tr>
        </thead>

        <tbody>
            <tr>
                <td align="center"><h1><?php echo intval($total_price); ?></h1></td>
                <td align="center"><h1><?php echo intval($total_order); ?></h1></td>
                <td align="center"><h1><?php echo intval($total_complete_order); ?></h1></td>
            </tr>
        </tbody>
      </table>
      <input type="hidden" name="task" value="index" />
      <input type="hidden" name="boxchecked" value="0" />
      <?php echo $this->FORM_TOKEN;?>
    </form>
    <div class="clr"></div>
  </div>
  <div class="b">
    <div class="b">
      <div class="b"></div>
    </div>
  </div>
</div>
